package com.yadang.optional;

import javax.xml.bind.annotation.*;
import java.util.List;

/**
 * @author: 亚当
 * @date: 2023年03月21日 23:00
 * @package: com.yadang.xml.entity
 * @Description: TODO
 */
@XmlRootElement(name = "Msg")
public class CcdcMsg {
    @XmlElement(name = "Header")
    private Header headers;
    @XmlElementWrapper(name = "Body")
    @XmlElement(name = "Record")
    private List<Record> record;

    // getters and setters

    public Header getHeader() {
        return headers;
    }

    public void setHeader(Header header) {
        this.headers = headers;
    }

    public List<Record> getRecords() {
        return record;
    }

    public void setRecords(List<Record> records) {
        this.record = records;
    }
}


@XmlAccessorType(XmlAccessType.FIELD)
class Header {
    @XmlElement(name = "Vrsn")
    private Vrsn vrsn;
    @XmlElement(name = "Sndr")
    private Sndr sndr;
    @XmlElement(name = "Rcvr")
    private Rcvr rcvr;
    @XmlElement(name = "FileDesc")
    private FileDesc fileDesc;

    // getters and setters

    public Vrsn getVrsn() {
        return vrsn;
    }

    public void setVrsn(Vrsn vrsn) {
        this.vrsn = vrsn;
    }

    public Sndr getSndr() {
        return sndr;
    }

    public void setSndr(Sndr sndr) {
        this.sndr = sndr;
    }

    public Rcvr getRcvr() {
        return rcvr;
    }

    public void setRcvr(Rcvr rcvr) {
        this.rcvr = rcvr;
    }

    public FileDesc getFileDesc() {
        return fileDesc;
    }

    public void setFileDesc(FileDesc fileDesc) {
        this.fileDesc = fileDesc;
    }
}

@XmlAccessorType(XmlAccessType.FIELD)
class Vrsn {
    @XmlElement(name = "VrsnID")
    private String vrsnId;

    // getter and setter

    public String getVrsnId() {
        return vrsnId;
    }

    public void setVrsnId(String vrsnId) {
        this.vrsnId = vrsnId;
    }
}

@XmlAccessorType(XmlAccessType.FIELD)
class Sndr {
    @XmlElement(name = "SndrId")
    private String sndrId;

    // getter and setter

    public String getSndrId() {
        return sndrId;
    }

    public void setSndrId(String sndrId) {
        this.sndrId = sndrId;
    }
}

@XmlAccessorType(XmlAccessType.FIELD)
class Rcvr {
    @XmlElement(name = "RcvrId")
    private String rcvrId;
    @XmlElement(name = "RcvrClntId")
    private String rcvrClntId;

    // getters and setters

    public String getRcvrId() {
        return rcvrId;
    }

    public void setRcvrId(String rcvrId) {
        this.rcvrId = rcvrId;
    }

    public String getRcvrClntId() {
        return rcvrClntId;
    }

    public void setRcvrClntId(String rcvrClntId) {
        this.rcvrClntId = rcvrClntId;
    }
}

@XmlAccessorType(XmlAccessType.FIELD)
class FileDesc {
    @XmlElement(name = "FileSndDateTime")
    private String fileSndDateTime;
    @XmlElement(name = "FileType")
    private String fileType;
    @XmlElement(name = "FileName")
    private String fileName;

    // getters and setters

    public String getFileSndDateTime() {
        return fileSndDateTime;
    }

    public void setFileSndDateTime(String fileSndDateTime) {
        this.fileSndDateTime = fileSndDateTime;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }
}

@XmlAccessorType(XmlAccessType.FIELD)
class Record {
    @XmlElement(name = "BIZ_DATE")
    private String bizDate;
    @XmlElement(name = "BOND_ACCT")
    private String bondAcct;
    @XmlElement(name = "BOND_ACCT_NAME_ABBR")
    private String bondAcctNameAbbr;
    @XmlElement(name = "BOND_CODE")
    private String bondCode;
    @XmlElement(name = "BOND_NAME_ABBR")
    private String bondNameAbbr;
    @XmlElement(name = "DENOMINATED_CURRENCY_DESC")
    private String denominatedCurrencyDesc;
    @XmlElementWrapper(name = "SUBJ_SET")
    @XmlElement(name = "SUBJ_BAL_UNIT_DESC")
    private List<String> subjBalUnitDescs;
    @XmlElementWrapper(name = "SUBJ_SET")
    @XmlElement(name = "BOND_SUBJ_NAME")
    private List<String> bondSubjNames;
    @XmlElementWrapper(name = "SUBJ_SET")
    @XmlElement(name = "SUBJ_FACE_AMNT")
    private List<Integer> subjFaceAmnts;


    // getters and setters

    public String getBizDate() {
        return bizDate;
    }

    public void setBizDate(String bizDate) {
        this.bizDate = bizDate;
    }

    public String getBondAcct() {
        return bondAcct;
    }

    public void setBondAcct(String bondAcct) {
        this.bondAcct = bondAcct;
    }

    public String getBondAcctNameAbbr() {
        return bondAcctNameAbbr;
    }

    public void setBondAcctNameAbbr(String bondAcctNameAbbr) {
        this.bondAcctNameAbbr = bondAcctNameAbbr;
    }

    public String getBondCode() {
        return bondCode;
    }

    public void setBondCode(String bondCode) {
        this.bondCode = bondCode;
    }

    public String getBondNameAbbr() {
        return bondNameAbbr;
    }

    public void setBondNameAbbr(String bondNameAbbr) {
        this.bondNameAbbr = bondNameAbbr;
    }

    public String getDenominatedCurrencyDesc() {
        return denominatedCurrencyDesc;
    }

    public void setDenominatedCurrencyDesc(String denominatedCurrencyDesc) {
        this.denominatedCurrencyDesc = denominatedCurrencyDesc;
    }

    public List<String> getBondSubjNames() {
        return bondSubjNames;
    }

    public void setBondSubjNames(List<String> bondSubjNames) {
        this.bondSubjNames = bondSubjNames;
    }

    public List<Integer> getSubjFaceAmnts() {
        return subjFaceAmnts;
    }

    public void setSubjFaceAmnts(List<Integer> subjFaceAmnts) {
        this.subjFaceAmnts = subjFaceAmnts;
    }

    public List<String> getSubjBalUnitDescs() {
        return subjBalUnitDescs;
    }

    public void setSubjBalUnitDescs(List<String> subjBalUnitDescs) {
        this.subjBalUnitDescs = subjBalUnitDescs;
    }
}
